<?php
//session_start();

require_once($_SERVER['DOCUMENT_ROOT'].'/mpd/config/config.php');

$maxpost=10;

$nip = $_SESSION['NIP'];

if(!isset($_GET['page'])){
	$pagenow = 1;
} else {
	$pagenow = $_GET['page'];
}
$jumlahhalaman=ceil(mysql_num_rows($query)/$maxpost);

$pagenow = ($pagenow-1)*$maxpost;

//baca tabel pekerjaan, jenis_pekerjaan dan status_pekerjaan
$query=mysql_query("SELECT p.ID_PEKERJAAN as id ,p.NAMA_PEKERJAAN as nama ,j.JENIS_PEKERJAAN as jenis ,p.DUE_PEKERJAAN  as due ,s.STATUS_PEKERJAAN as status,p.SCORE as nilai FROM pekerjaan as p INNER JOIN jenis_pekerjaan as j ON p.ID_JENIS = j.ID_JENIS INNER JOIN status_pekerjaan as s on p.ID_STATUS_PEKERJAAN = s.ID_STATUS_PEKERJAAN WHERE p.NIP =".$nip." ORDER BY p.ID_PEKERJAAN LIMIT $pagenow, $maxpost");  

?>